<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="PowerDNS Documentation - Authoritative Server and Recursor documentation">
    <meta name="author" content="PowerDNS">

    <title>PowerDNS Documentation</title>

    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">


    <link rel="icon" type="image/png" href="website/img/favicon.png">
    <!-- Custom styles -->
    <style>
        :root {
            --pdns-blue: #00A2DF;
            --pdns-dark: #1D1D1B;
        }
        body {
            font-family: "Open Sans", system-ui, -apple-system, sans-serif;
        }
        .navbar {
            background-color: white;
            padding: 1rem 0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .navbar-brand img {
            height: 40px;
        }
        .hero {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            padding: 4rem 0;
            margin-bottom: 2rem;
        }
        .hero h1 {
            color: var(--pdns-dark);
            font-weight: 600;
            margin-bottom: 1.5rem;
        }
        .hero p {
            font-size: 1.1rem;
            color: #495057;
            max-width: 800px;
            margin: 0 auto 1.5rem;
        }
        .product-links {
            padding: 2rem 0;
        }
        .product-links h2 {
            font-size: 1.4rem;
            margin-bottom: 2rem;
            color: #666;
            font-weight: normal;
        }
        .product-card {
            background: #fff;
            padding: 1.5rem;
            height: 100%;
            transition: all 0.2s ease-in-out;
        }
        .product-card:hover {
            background-color: #f8f9fa;
        }
        .product-card h3 {
            font-size: 1.25rem;
            margin-bottom: 0.75rem;
        }
        .product-card h3 a {
            color: var(--pdns-blue);
            text-decoration: none;
        }
        .product-card h3 a:hover {
            text-decoration: underline;
        }
        .product-card p {
            color: #666;
            margin-bottom: 0;
            font-size: 0.95rem;
        }
        footer {
            background-color: #666666;
            color: white;
            padding: 2rem 0;
            margin-top: 3rem;
        }
    </style>

</head>

<body>

    <!-- Navigation -->
    <nav class="navbar navbar-expand-lg">
        <div class="container">
            <a class="navbar-brand" href="https://www.powerdns.com/">
                <img src="website/img/powerdns-logo-trans.png" alt="PowerDNS">
            </a>
        </div>
    </nav>

    <!-- Hero Section -->
    <section class="hero text-center">
        <div class="container">
            <h1>PowerDNS Documentation</h1>
            <p>PowerDNS offers three main products: the Authoritative Server, the Recursor, and dnsdist. The Authoritative Server and Recursor are separate components that can be mixed seamlessly, while dnsdist provides high-performance load balancing and DDoS protection.</p>
        </div>
    </section>

    <!-- Main Content -->
    <div class="container">
        <div class="row">
            <div class="col-md-4">
                <div class="mb-4">
                    <h2>Authoritative Server</h2>
                    <p>The Authoritative Server answers questions about domains it knows about, but will not go out on the net to resolve queries about other domains. When the Authoritative Server answers a question, it comes out of the database, and can be trusted as being authoritative.</p>
                    <a href="/authoritative" class="btn btn-outline-primary">View Documentation</a>
                    <div id="auth-versions"></div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="mb-4">
                    <h2>Recursor</h2>
                    <p>The Recursor, by default has no knowledge of domains itself, but will always consult other authoritative servers to answer questions given to it. It's designed for high-performance recursive DNS resolution.</p>
                    <a href="/recursor" class="btn btn-outline-primary">View Documentation</a>
                    <div id="rec-versions"></div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="mb-4">
                    <h2>dnsdist</h2>
                    <p>dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer that can be used to distribute incoming traffic across multiple DNS servers.</p>
                    <a href="https://dnsdist.org/" class="btn btn-outline-primary">View Documentation</a>
                    <div id="dnsdist-versions"></div>
                </div>
            </div>
        </div>

        <div class="product-links mt-5">
            <div class="container">
                <h2 class="text-center">Additional Products</h2>
                <div class="row g-4">
                    <div class="col-md-6">
                        <div class="product-card">
                            <h3><a href="/cloudcontrol/latest/">PowerDNS Cloud Control</a></h3>
                            <p>Cloud-based DNS management solution.</p>
                            <div id="cc-versions"></div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="product-card">
                            <h3><a href="/dstore/latest/">PowerDNS dstore</a></h3>
                            <p>Distributed storage solution for DNS data.</p>
                            <div id="dstore-versions"></div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="product-card">
                            <h3><a href="/lightningstream/">PowerDNS Lightning Stream</a></h3>
                            <p>Tool to sync LMDB databases through S3 buckets between multiple servers in near real-time.</p>
                            <div id="lightningstream-versions"></div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="product-card">
                            <h3><a href="/zonecontrol/latest">PowerDNS ZoneControl</a></h3>
                            <p>DNS zone management and control system.</p>
                            <div id="zonecontrol-versions"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer class="text-center">
        <div class="container">
            <p class="mb-0">&copy; PowerDNS.com</p>
        </div>
    </footer>

    <!-- Bootstrap 5 JavaScript -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
    <!-- Version Selector -->
    <script src="website/js/version-selector.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', () => {
            // Authoritative Server
            loadVersionSelector(
                '/authoritative',
                'auth-versions'
            );

            // Recursor
            loadVersionSelector(
                '/recursor',
                'rec-versions'
            );

            // Cloud Control
            loadVersionSelector(
                '/cloudcontrol',
                'cc-versions',
                {
                    url: 'https://software.open-xchange.com/products/powerdns/doc/cc/',
                    label: '2.X and older'
                }
            );

            // DNSdist
            loadVersionSelector(
                'https://dnsdist.org',
                'dnsdist-versions'
            );

            // Dstore
            loadVersionSelector(
                '/dstore',
                'dstore-versions',
                null,
                [
                    { version: '2.1' },
                    { version: '2.0' },
                    { version: '1.5' }
                ]
            );

            // Lightning Stream
            loadVersionSelector(
                '/lightningstream',
                'lightningstream-versions'
            );

            // Zone Control
            loadVersionSelector(
                '/zonecontrol',
                'zonecontrol-versions',
                null,
                [
                    { version: '1.7.0', aliases: [] },
                    { version: '1.6.3', aliases: [] },
                    { version: '1.6.2', aliases: [] },
                    { version: '1.6.1', aliases: [] },
                    { version: '1.6.0', aliases: [] },
                    { version: '1.5.1', aliases: [] },
                    { version: '1.5.0', aliases: [] },
                    { version: '1.4.2', aliases: [] }
                ]
            );
        });
    </script>

</body>

</html>
